<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>注册-众筹圈子人</title>
	<meta name="Keywords" content="众筹，众筹网，众筹导航，众筹门户，股权众筹，众筹平台，众筹圈子人，众筹项目，众筹三方
影视众筹，店铺众筹，餐饮众筹，众筹报告，创业众筹，投后管理，项目融资，项目众筹，权力的游戏，冰与火之歌" />
	<meta name="Description" content="汇集各行业高手分析众筹项目，行业问答，众筹资讯。" />
	<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
	<meta name="renderer" content="webkit"/>
	<link rel="stylesheet" href="<%=path%>/css/bootstrap/3.3.5/css/bootstrap.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/cz.css" />

	<script src="<%=path%>/js/jquery-1.11.0.min.js"></script>
	<script src="<%=path%>/css/bootstrap/3.3.5/js/bootstrap.min.js"></script>
	<script src="<%=path%>/js/plugins/layer/layer.js"></script>

	<script src="<%=path%>/js/slider.js"></script>
	<script src="<%=path%>/js/common.js"></script>
<body class="reg-bg">
<jsp:include page="/views/commons/header.jsp"></jsp:include>
<div class="container">
	<div class="col-sm-6 col-sm-offset-3">
		<form id="signupForm" class="form-horizontal" novalidate="novalidate">

			<div class="form-group">
				<label class="col-sm-3 control-label">帐号：</label>
				<div class="col-sm-8">
					<input type="text" aria-invalid="false" aria-required="true" class="form-control" id="user_account" name="userAccount" placeholder="允许输入字母、_、数字，长度6到15位"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">昵称：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="userName" id="user_name" placeholder="长度2到10位，允许输入字母、数字、汉字"></div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">密码：</label>
				<div class="col-sm-8">
					<input type="password" class="form-control" name="password" id="password" placeholder="长度6到15位，允许输入字母、_、数字"></div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">确认密码：</label>
				<div class="col-sm-8">
					<input type="password" class="form-control" name="confirmPassword" id="confirm_password" placeholder="长度6到15位，允许输入字母、_、数字"></div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">邮箱：</label>
				<div class="col-sm-8">
					<input type="email" class="form-control" name="email" id="email" placeholder="可通过此邮箱找回密码"></div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">验证码：</label>
				<div class="col-sm-5">
					<input type="text" aria-invalid="false" id="image_code" name="imageCode" aria-required="true" class="form-control" ></div>
				<div class="col-sm-3">
					<img id="imgCode" src="<%=path%>/uncheck/imageCode/register_page" height="34" alt="" onclick="javascript:refreshImage()"></div>
			</div>

			<div class="form-group">
				<div class="col-sm-8 col-sm-offset-3">
					<div class="checkbox">
						<label>
							<input type="checkbox" checked="checked" name="agree" id="agree" class="checkbox">
							我已经阅读并同意《<a href="<%=path%>/views/about/statement.jsp">众筹圈子人注册协议</a>》
						</label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-8 col-sm-offset-3">
					<input id="regbtn" type="button" class="btn btn-primary" value="注册" onclick="javascript:doRegister()"/>
					<span class="ml10 c_666">
						已有帐户，
						<a href="<%=path%>/uncheck/login">登录</a>
					</span>
				</div>
			</div>
		</form>
	</div>
</div>
<jsp:include page="/views/commons/footer.jsp"></jsp:include>
</body>
<script type="text/javascript">

function doRegister(){
	$("#regbtn").addClass("disabled").attr("disabled","disabled").val("注册中");
	var redirectUrl="${redirectUrl}";
	$.ajax({
		url : path + "/uncheck/doRegister",
		type : "post",
		dataType : "json",
		data : {
			userAccount : $("#user_account").val(),
			userName : $("#user_name").val(),
			userPassword : $("#password").val(),
			confirmPassword:$("#confirm_password").val(),
			email:$("#email").val(),
			imageCode : $("#image_code").val()
		},
		success : function(data)
		{
			if(data.result)
			{
				if(redirectUrl != ''){
					window.location.href = redirectUrl;
				}else{
					window.location.href = path + "/";
				}
			}
			else
			{
				layer.msg(data.msg,{icon: 2});
				$("#regbtn").removeClass("disabled").removeAttr("disabled").val("注册");
			}
		},error:function(){
			layer.msg("服务器网络繁忙",{icon: 2});
			$("#regbtn").removeClass("disabled").removeAttr("disabled").val("注册");
		}
	});
}

</script>
</html>